home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / lzrtpu.zip / LASERPRT.PAS < prev    next >
Pascal/Delphi Source File  |  1990-10-19  |  25KB  |  735 lines

  1. Unit LaserPrt;
  2.  
  3. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4. Unit for formating program printouts to be printed on an HP LaserJet
  5. or compatible printer.
  6.  
  7. Prepared by Bob Smedley (Compuserv PPN 72331,3615)
  8.  
  9. Copyright, 1990 - D. Robert Smedley
  10. This Turbo Pascal unit is made available at no cost for non-commercial
  11. use only.
  12.  
  13. The author makes no claim as to the unit's suitability for any specific
  14. use and expressly disavows any responsibility for real or consequential
  15. damages of any sort.
  16. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  17.  
  18. Interface
  19.  
  20. Type
  21.   PrinterUnits = (columns, decipoints, dots, rows);
  22.  
  23. Function trimspaces(s:string):string;
  24. {this function removes both leading and trailing blanks in a string}
  25.  
  26. Function intostring(i:longint):string;
  27. {this function converts a longint type number into a string with all
  28.  blanks removed}
  29.  
  30. Function realtostring(r:real;places:integer):string;
  31. {this function converts a real type number into a string with all
  32.  blanks removed}
  33.  
  34. Function ResetLaser:String;
  35. {this function resets the printer}
  36.  
  37. Function Legal:string;
  38. {this function calls for the legal page size}
  39.  
  40. Function Letter:string;
  41. {this function calls for the letter page size}
  42.  
  43. Function Pagelength(J:Integer):string;
  44. {this function selects the logical page length in lines}
  45.  
  46. Function Portrait:String;
  47. {this function designates a portrait printout}
  48.  
  49. Function Landscape:String;
  50. {this function designates a landscape printout}
  51.  
  52. Function LeftMargin(J:Integer):String;
  53. {this function sets the left margin to the specified column}
  54.  
  55. Function RightMargin(J:Integer):String;
  56. {this function sets the right margin to the specified column}
  57.  
  58. Function ClearMargins:String;
  59. {this function clears both left and right margins}
  60.  
  61. Function TopMargin(J:Integer):String;
  62. {this function sets the number of lines between the top of the logical
  63. page and the top of the text}
  64.  
  65. Function Linesperinch(J:Integer):String;
  66. {this function sets the number of lines per inch.  Only 1, 2, 3, 4, 6,
  67. 8, 12, 16, 24, and 48 lpi are supported.  Numbers between these are
  68. rounded based on the following case structure:
  69.                      1: J:=1;
  70.                      2: J:=2;
  71.                      3: J:=3;
  72.                      4: J:=4;
  73.                   5..6: J:=6;
  74.                  7..10: J:=8;
  75.                 11..13: J:=12;
  76.                 14..20: J:=16;
  77.                 21..36: J:=24;
  78.                 37..99: J:=48;}
  79.  
  80. Function VMI(X:real):string;
  81. {this function designates the distance between lines - an alternate way
  82. to set lines per inch.  The X parameter is equal to the number of 1/48th
  83. of an inch that the vertical motion index is to be set. It is valid to
  84. four decimal places}
  85.  
  86. Function AbsoluteX(X:Real;PrtUnits:PrinterUnits):String;
  87. {this function moves the cursor to a specific dimension from the left
  88. edge of the logical page.  The move can be given either in terms of the
  89. column number, decipoints (a decipoint is 1/720th inch), or dots (a dot
  90. is 1/300th inch).
  91.  
  92. When columns are used, the X parameter is the column number from the
  93. left edge of the logical page for the new location of the cursor and the
  94. PrtUnits parameter is "Columns" (without the quotes).  The column number
  95. is valid to 4 decimal places.
  96.  
  97. When decipoints are used, the X parameter is the number of decipoints
  98. from the left edge of the logical page for the new location of the
  99. cursor and the PrtUnits parameter is "Decipoints" (without the quotes).
  100.   The decipoint value is valid to 2 decimal places.
  101.  
  102. When dots are used, the X parameter is the number of dots from the left
  103. edge of the logical page for the new location of the cursor and the
  104. PrtUnits parameter is "Dots" (without the quotes).  The dot value is
  105. valid to 0 (zero) decimal places (i.e. only integer numbers are valid
  106. but must be provided as real).}
  107.  
  108. Function AbsoluteY(Y:Real;PrtUnits:PrinterUnits):String;
  109. {this function moves the cursor to a specific dimension from the top
  110. margin.  The move can be given either in terms of the row number,
  111. decipoints (a decipoint is 1/720th inch), or dots (a dot is 1/300th inch).
  112.  
  113. When rows are used, the Y parameter is the row number from the top
  114. margin for the new location of the cursor and the PrtUnits parameter is
  115. "Rows" (without the quotes).  The row number is valid to 4 decimal
  116. places.
  117.  
  118. When decipoints are used, the Y parameter is the number of decipoints
  119. from the top margin for the new location of the cursor and the PrtUnits
  120. parameter is "Decipoints" (without the quotes).  The decipoint value is
  121. valid to 2 decimal places.
  122.  
  123. When dots are used, the Y parameter is the number of dots from the top
  124. margin for the new location of the cursor and the PrtUnits parameter is
  125. "Dots" (without the quotes).  The dot value is valid to 0 (zero) decimal
  126. places (i.e. only integer numbers are valid but must be provided as
  127. real).}
  128.  
  129. Function RightX(X:real;PrtUnits:PrinterUnits):string;
  130. {this function moves the cursor a specific distance to the right from
  131. the current location of the cursor.  The move can be given either in
  132. terms of number of columns, decipoints (a decipoint is 1/720th inch), or
  133. dots (a dot is 1/300th inch).
  134.  
  135. When columns are used, the X parameter is the number of columns to move
  136. from the current position of the cursor and the PrtUnits parameter is
  137. "Columns" (without the quotes).  The number of columns number is valid
  138. to 4 decimal places.
  139.  
  140. When decipoints are used, the X parameter is the number of decipoints
  141. to move from the current position of the cursor and the PrtUnits
  142. parameter is "Decipoints" (without the quotes).  The decipoint value is
  143. valid to 2 decimal places.
  144.  
  145. When dots are used, the X parameter is the number of dots to move from
  146. the current position of the cursor and the PrtUnits parameter is "Dots"
  147. (without the quotes).  The dot value is valid to 0 (zero) decimal places
  148. (i.e. only integer numbers are valid but must be provided as real).}
  149.  
  150. Function LeftX(X:real;PrtUnits:PrinterUnits):string;
  151. {this function moves the cursor a specific distance to the left from
  152. the current location of the cursor.  The move can be given either in
  153. terms of number of columns, decipoints (a decipoint is 1/720th inch), or
  154. dots (a dot is 1/300th inch).
  155.  
  156. When columns are used, the X parameter is the number of columns to move
  157. from the current position of the cursor and the PrtUnits parameter is
  158. "Columns" (without the quotes).  The number of columns number is valid
  159. to 4 decimal places.
  160.  
  161. When decipoints are used, the X parameter is the number of decipoints
  162. to move from the current position of the cursor and the PrtUnits
  163. parameter is "Decipoints" (without the quotes).  The decipoint value is
  164. valid to 2 decimal places.
  165.  
  166. When dots are used, the X parameter is the number of dots to move from
  167. the current position of the cursor and the PrtUnits parameter is "Dots"
  168. (without the quotes).  The dot value is valid to 0 (zero) decimal places
  169. (i.e. only integer numbers are valid but must be provided as real).}
  170.  
  171. Function UpY(Y:real;PrtUnits:PrinterUnits):string;
  172. {this function moves the cursor a specific distance up from the current
  173. position of the cursor.  The move can be given either in terms of the
  174. number of rows, decipoints (a decipoint is 1/720th inch), or dots (a dot
  175. is 1/300th inch).
  176.  
  177. When rows are used, the Y parameter is the number of rows to move the
  178. cursor from the current location of the cursor and the PrtUnits
  179. parameter is "Rows" (without the quotes).  The row number is valid to 4
  180. decimal places.
  181.  
  182. When decipoints are used, the Y parameter is the number of decipoints
  183. to move the cursor from the current location of the cursor and the
  184. PrtUnits parameter is "Decipoints" (without the quotes).  The decipoint
  185. value is valid to 2 decimal places.
  186.  
  187. When dots are used, the Y parameter is the number of dots to move the
  188. cursor from the current location of the cursor and the PrtUnits
  189. parameter is "Dots" (without the quotes).  The dot value is valid to 0
  190. (zero) decimal places (i.e. only integer numbers are valid but must be
  191. provided as real).}
  192.  
  193. Function DownY(Y:real;PrtUnits:PrinterUnits):string;
  194. {this function moves the cursor a specific distance down from the
  195. current position of the cursor.  The move can be given either in terms
  196. of the number of rows, decipoints (a decipoint is 1/720th inch), or dots
  197. (a dot is 1/300th inch).
  198.  
  199. When rows are used, the Y parameter is the number of rows to move the
  200. cursor from the current location of the cursor and the PrtUnits
  201. parameter is "Rows" (without the quotes).  The row number is valid to 4
  202. decimal places.
  203.  
  204. When decipoints are used, the Y parameter is the number of decipoints
  205. to move the cursor from the current location of the cursor and the
  206. PrtUnits parameter is "Decipoints" (without the quotes).  The decipoint
  207. value is valid to 2 decimal places.
  208.  
  209. When dots are used, the Y parameter is the number of dots to move the
  210. cursor from the current location of the cursor and the PrtUnits
  211. parameter is "Dots" (without the quotes).  The dot value is valid to 0
  212. (zero) decimal places (i.e. only integer numbers are valid but must be
  213. provided as real).}
  214.  
  215. Function HalfLine:String;
  216. {this function moves the cursor to the same character position one half
  217. line down.  The distance moved depends on the lines per inch value}
  218.  
  219. Function LineFeed:String;
  220. {this function moves the cursor to the same character position one line
  221. down.  The distance moved depends on the lines per inch value}
  222.  
  223. Function FormFeed:String;
  224. {this function issues a form feed}
  225.  
  226. Function PushXY:String;
  227. {this function allows the cursor position to be stored and recalled for
  228. later use.  Up to 20 positions may be pushed}
  229.  
  230. Function PopXY:String;
  231. {this function recalls the last "pop'ed" cursor location}
  232.  
  233. Function SymbolSet(Sym:String):String;
  234. {this function designates the primary set of symbols or characters
  235. contained in a font.  Refer to your printer manual for the available
  236. symbol sets.  Some of the moct common are:
  237.               8M - HP Math-8
  238.               8U - HP Roman-8
  239.              10U - PC-8 (USA)
  240.               0N - ECMA-94 Latin 1}
  241.  
  242. Function Proportional:String;
  243. {this function designates a proportional spaced font}
  244.  
  245. Function Fixed:String;
  246. {this function designates a fixed spaced font}
  247.  
  248. Function Pitch(X:real):String;
  249. {this function designated the horizontal spacing of a fixed spaced font
  250. in terms of the number of characters per inch.}
  251.  
  252. Function Points(X:real):String;
  253. {this function designates the height of the font in points.}
  254.  
  255. Function Upright:String;
  256. {this function selects an upright font style}
  257.  
  258. Function Italic:String;
  259. {this function selects an italic font style}
  260.  
  261. Function Bold:String;
  262. {this function selects a bold stroke weight}
  263.  
  264. Function Normal:String;
  265. {this function selects a normal (medium) stroke weight}
  266.  
  267. Function UltraBlack:String;
  268. {this function selects an ultra black stroke weight}
  269.  
  270. Function UltraThin:String;
  271. {this function selects an ultra thin stroke weight}
  272.  
  273. Function LinePrinter:String;
  274. {this function selects the Lineprinter font}
  275.  
  276. Function Pica:String;
  277. {this function selects the Pica font}
  278.  
  279. Function Elite:String;
  280. {this function selects the Elite font}
  281.  
  282. Function Courier:String;
  283. {this function selects the Courier font}
  284.  
  285. Function Helv:String;
  286. {this function selects the Helvetica font}
  287.  
  288. Function TimesRoman:String;
  289. {this function selects the Times Roman font}
  290.  
  291. Function Gothic:String;
  292. {this function selects the Gothic font}
  293.  
  294. Function Script:String;
  295. {this function selects the Script font}
  296.  
  297. Function Prestige:String;
  298. {this function selects the Prestige font}
  299.  
  300. Function UnderlineOn:String;
  301. {this function turns on the fixed undeline}
  302.  
  303. Function UnderlineOff:String;
  304. {this function turns off the undeline}
  305.  
  306. Function shadewidth(X:real):string;
  307. {this function specifies the rectangular fill area width in decipoints.}
  308.  
  309. Function shadeheight(X:real):string;
  310. {this function specifies the rectangular fill area height in
  311. decipoints.}
  312.  
  313. Function shadepercent(J:Integer):string;
  314. {this function sets the level of shading to be used.  The J parameter is
  315. in terms of percent shading.}
  316.  
  317. Function printshade:string;
  318. {this function causes the defined rectangular area to be filled with the
  319. specified shading}
  320.  
  321. Implementation
  322. {---------------------------------------------------------------------}
  323. Function trimspaces(s:string):string;
  324.  
  325. Begin
  326.   while (s[1]= ' ') do
  327.     delete(s,1,1);
  328.   while (s[length(s)]= ' ') do dec(s[0]);
  329.   trimspaces:=s;
  330. end;
  331. {---------------------------------------------------------------------}
  332. {---------------------------------------------------------------------}
  333. Function intostring(i:longint):string;
  334.  
  335. var
  336. s:string;
  337.  
  338. begin
  339.   str(i:12,s);
  340.   intostring:=trimspaces(s);
  341. end;
  342. {---------------------------------------------------------------------}
  343. {---------------------------------------------------------------------}
  344. Function realtostring(r:real;places:integer):string;
  345.  
  346. var
  347. s:string;
  348.  
  349. begin
  350.   str(r:15:places,s);
  351.   realtostring:=trimspaces(s);
  352. end;
  353. {---------------------------------------------------------------------}
  354. {---------------------------------------------------------------------}
  355. Function ResetLaser:String;
  356.  
  357. Begin
  358. ResetLaser:=chr(27)+'E';
  359. end;
  360. {---------------------------------------------------------------------}
  361. {---------------------------------------------------------------------}
  362. Function Legal:string;
  363.  
  364. begin
  365. legal:=chr(27)+'&l3A';
  366. end;
  367. {---------------------------------------------------------------------}
  368. {---------------------------------------------------------------------}
  369. Function Letter:string;
  370.  
  371. begin
  372. letter:=chr(27)+'&l2A';
  373. end;
  374. {---------------------------------------------------------------------}
  375. {---------------------------------------------------------------------}
  376. Function Pagelength(J:Integer):string;
  377.  
  378. begin
  379. Pagelength:=chr(27)+'&l'+intostring(J)+'P';
  380. end;
  381. {---------------------------------------------------------------------}
  382. {---------------------------------------------------------------------}
  383. Function Portrait:String;
  384.  
  385. Begin
  386. Portrait:=chr(27)+'&l0O';
  387. End;
  388. {--------------------------------------------------------------------}
  389. {--------------------------------------------------------------------}
  390. Function Landscape:String;
  391.  
  392. Begin
  393. Landscape:=chr(27)+'&l1O';
  394. End;
  395. {--------------------------------------------------------------------}
  396. {--------------------------------------------------------------------}
  397. Function LeftMargin(J:Integer):String;
  398.  
  399. Begin
  400. leftmargin:=chr(27)+'&a'+intostring(J)+'L';
  401. End;
  402. {--------------------------------------------------------------------}
  403. {--------------------------------------------------------------------}
  404. Function RightMargin(J:Integer):String;
  405.  
  406. Begin
  407. rightmargin:=chr(27)+'&a'+intostring(J)+'M';
  408. End;
  409. {--------------------------------------------------------------------}
  410. {--------------------------------------------------------------------}
  411. Function ClearMargins:String;
  412.  
  413. Begin
  414. clearmargins:=chr(27)+'9';
  415. End;
  416. {--------------------------------------------------------------------}
  417. {--------------------------------------------------------------------}
  418. Function TopMargin(J:Integer):String;
  419.  
  420. Begin
  421. Topmargin:=chr(27)+'&l'+intostring(J)+'E';
  422. End;
  423. {--------------------------------------------------------------------}
  424. {--------------------------------------------------------------------}
  425. Function Linesperinch(J:Integer):String;
  426.  
  427. Begin
  428. case J of
  429.       1: J:=1;
  430.       2: J:=2;
  431.       3: J:=3;
  432.       4: J:=4;
  433.    5..6: J:=6;
  434.   7..10: J:=8;
  435.  11..13: J:=12;
  436.  14..20: J:=16;
  437.  21..36: J:=24;
  438.  37..99: J:=48;
  439.   end;
  440. linesperinch:=chr(27)+'&l'+intostring(J)+'D';
  441. End;
  442. {--------------------------------------------------------------------}
  443. {--------------------------------------------------------------------}
  444. Function VMI(X:real):String;
  445.  
  446. begin
  447.   vmi:=chr(27)+'&l'+realtostring(x,4)+'C';
  448. End;
  449. {--------------------------------------------------------------------}
  450. {--------------------------------------------------------------------}
  451. Function AbsoluteX(X:real;PrtUnits:PrinterUnits):String;
  452.  
  453. Begin
  454. case PrtUnits of
  455.  columns    : AbsoluteX:=chr(27)+'&a'+realtostring(x,4)+'C';
  456.  Decipoints : AbsoluteX:=chr(27)+'&a'+realtostring(x,2)+'H';
  457.  Dots       : AbsoluteX:=chr(27)+'*p'+realtostring(x,0)+'X';
  458.  end;
  459. End;
  460. {--------------------------------------------------------------------}
  461. {--------------------------------------------------------------------}
  462. Function AbsoluteY(Y:real;PrtUnits:PrinterUnits):String;
  463.  
  464. Begin
  465. case PrtUnits of
  466.  rows       : AbsoluteY:=chr(27)+'&a'+realtostring(Y,4)+'R';
  467.  Decipoints : AbsoluteY:=chr(27)+'&a'+realtostring(Y,2)+'V';
  468.  Dots       : AbsoluteY:=chr(27)+'*p'+realtostring(Y,0)+'Y';
  469.  end;
  470. End;
  471. {--------------------------------------------------------------------}
  472. {---------------------------------------------------------------------}
  473. Function RightX(X:real;PrtUnits:PrinterUnits):string;
  474.  
  475. Begin
  476. case PrtUnits of
  477.  columns    : RightX:=chr(27)+'&a+'+realtostring(x,4)+'C';
  478.  Decipoints : RightX:=chr(27)+'&a+'+realtostring(x,2)+'H';
  479.  Dots       : RightX:=chr(27)+'*p+'+realtostring(x,0)+'X';
  480.  end;
  481. End;
  482. {---------------------------------------------------------------------}
  483. {---------------------------------------------------------------------}
  484. Function LeftX(X:real;PrtUnits:PrinterUnits):string;
  485.  
  486. Begin
  487. case PrtUnits of
  488.  columns    : LeftX:=chr(27)+'&a-'+realtostring(x,4)+'C';
  489.  Decipoints : LeftX:=chr(27)+'&a-'+realtostring(x,2)+'H';
  490.  Dots       : LeftX:=chr(27)+'*p-'+realtostring(x,0)+'X';
  491.  end;
  492. End;
  493. {---------------------------------------------------------------------}
  494. {---------------------------------------------------------------------}
  495. Function UpY(Y:real;PrtUnits:PrinterUnits):string;
  496.  
  497. Begin
  498. case PrtUnits of
  499.  rows       : UpY:=chr(27)+'&a-'+realtostring(Y,4)+'R';
  500.  Decipoints : UpY:=chr(27)+'&a-'+realtostring(Y,2)+'V';
  501.  Dots       : UpY:=chr(27)+'*p-'+realtostring(Y,0)+'Y';
  502.  end;
  503. End;
  504. {---------------------------------------------------------------------}
  505. {---------------------------------------------------------------------}
  506. Function DownY(Y:real;PrtUnits:PrinterUnits):string;
  507.  
  508. Begin
  509. case PrtUnits of
  510.  rows       : DownY:=chr(27)+'&a+'+realtostring(Y,4)+'R';
  511.  Decipoints : DownY:=chr(27)+'&a+'+realtostring(Y,2)+'V';
  512.  Dots       : DownY:=chr(27)+'*p+'+realtostring(Y,0)+'Y';
  513.  end;
  514. End;
  515. {---------------------------------------------------------------------}
  516. {--------------------------------------------------------------------}
  517. Function HalfLine:String;
  518.  
  519. Begin
  520. halfline:=chr(27)+'=';
  521. End;
  522. {--------------------------------------------------------------------}
  523. {--------------------------------------------------------------------}
  524. Function LineFeed:String;
  525.  
  526. Begin
  527. linefeed:=chr(10);
  528. End;
  529. {--------------------------------------------------------------------}
  530. {--------------------------------------------------------------------}
  531. Function FormFeed:String;
  532.  
  533. Begin
  534. Formfeed:=chr(12);
  535. End;
  536. {--------------------------------------------------------------------}
  537. {--------------------------------------------------------------------}
  538. Function PushXY:String;
  539.  
  540. Begin
  541. PushXY:=chr(27)+'&f0S';
  542. End;
  543. {--------------------------------------------------------------------}
  544. {--------------------------------------------------------------------}
  545. Function PopXY:String;
  546.  
  547. Begin
  548. PopXY:=chr(27)+'&f1S';
  549. End;
  550. {--------------------------------------------------------------------}
  551. {--------------------------------------------------------------------}
  552. Function SymbolSet(Sym:String):String;
  553.  
  554. Begin
  555. SymbolSet:=chr(27)+'('+Sym;
  556. End;
  557. {--------------------------------------------------------------------}
  558. {--------------------------------------------------------------------}
  559. Function Proportional:String;
  560.  
  561. Begin
  562. Proportional:=chr(27)+'(s1P';
  563. End;
  564. {--------------------------------------------------------------------}
  565. {--------------------------------------------------------------------}
  566. Function Fixed:String;
  567.  
  568. Begin
  569. Fixed:=chr(27)+'(s0P';
  570. End;
  571. {--------------------------------------------------------------------}
  572. {--------------------------------------------------------------------}
  573. Function Pitch(X:real):String;
  574.  
  575. Begin
  576. pitch:=chr(27)+'(s'+realtostring(x,2)+'H';
  577. End;
  578. {--------------------------------------------------------------------}
  579. {--------------------------------------------------------------------}
  580. Function Points(X:real):String;
  581.  
  582. Begin
  583. points:=chr(27)+'(s'+realtostring(x,2)+'V';
  584. End;
  585. {--------------------------------------------------------------------}
  586. {--------------------------------------------------------------------}
  587. Function Upright:String;
  588.  
  589. Begin
  590. Upright:=chr(27)+'(s0S';
  591. End;
  592. {--------------------------------------------------------------------}
  593. {--------------------------------------------------------------------}
  594. Function Italic:String;
  595.  
  596. Begin
  597. Italic:=chr(27)+'(s1S';
  598. End;
  599. {--------------------------------------------------------------------}
  600. {--------------------------------------------------------------------}
  601. Function Bold:String;
  602.  
  603. Begin
  604. Bold:=chr(27)+'(s3B';
  605. End;
  606. {--------------------------------------------------------------------}
  607. {--------------------------------------------------------------------}
  608. Function Normal:String;
  609.  
  610. Begin
  611. Normal:=chr(27)+'(s0B';
  612. End;
  613. {--------------------------------------------------------------------}
  614. {--------------------------------------------------------------------}
  615. Function UltraBlack:String;
  616.  
  617. Begin
  618. UltraBlack:=chr(27)+'(s7B';
  619. End;
  620. {--------------------------------------------------------------------}
  621. {--------------------------------------------------------------------}
  622. Function UltraThin:String;
  623.  
  624. Begin
  625. UltraThin:=chr(27)+'(s-7B';
  626. End;
  627. {--------------------------------------------------------------------}
  628. {--------------------------------------------------------------------}
  629. Function LinePrinter:String;
  630.  
  631. Begin
  632. Lineprinter:=chr(27)+'(s0T';
  633. End;
  634. {--------------------------------------------------------------------}
  635. {--------------------------------------------------------------------}
  636. Function Pica:String;
  637.  
  638. Begin
  639. Pica:=chr(27)+'(s1T';
  640. End;
  641. {--------------------------------------------------------------------}
  642. {--------------------------------------------------------------------}
  643. Function Elite:String;
  644.  
  645. Begin
  646. Elite:=chr(27)+'(s2T';
  647. End;
  648. {--------------------------------------------------------------------}
  649. {--------------------------------------------------------------------}
  650. Function Courier:String;
  651.  
  652. Begin
  653. Courier:=chr(27)+'(s3T';
  654. End;
  655. {--------------------------------------------------------------------}
  656. {--------------------------------------------------------------------}
  657. Function Helv:String;
  658.  
  659. Begin
  660. Helv:=chr(27)+'(s4T';
  661. End;
  662. {--------------------------------------------------------------------}
  663. {--------------------------------------------------------------------}
  664. Function TimesRoman:String;
  665.  
  666. Begin
  667. TimesRoman:=chr(27)+'(s5T';
  668. End;
  669. {--------------------------------------------------------------------}
  670. {--------------------------------------------------------------------}
  671. Function Gothic:String;
  672.  
  673. Begin
  674. Gothic:=chr(27)+'(s6T';
  675. End;
  676. {--------------------------------------------------------------------}
  677. {--------------------------------------------------------------------}
  678. Function Script:String;
  679.  
  680. Begin
  681. Script:=chr(27)+'(s7T';
  682. End;
  683. {--------------------------------------------------------------------}
  684. {--------------------------------------------------------------------}
  685. Function Prestige:String;
  686.  
  687. Begin
  688. Prestige:=chr(27)+'(s8T';
  689. End;
  690. {--------------------------------------------------------------------}
  691. {--------------------------------------------------------------------}
  692. Function UnderlineOn:String;
  693.  
  694. Begin
  695. UnderlineOn:=chr(27)+'&d0D';
  696. End;
  697. {--------------------------------------------------------------------}
  698. {--------------------------------------------------------------------}
  699. Function UnderlineOff:String;
  700.  
  701. Begin
  702. UnderlineOff:=chr(27)+'&d@';
  703. end;
  704. {---------------------------------------------------------------------}
  705. {---------------------------------------------------------------------}
  706. Function shadewidth(X:real):string;
  707.  
  708. Begin
  709. shadewidth:=chr(27)+'*c'+realtostring(x,2)+'H';
  710. end;
  711. {---------------------------------------------------------------------}
  712. {---------------------------------------------------------------------}
  713. Function shadeheight(X:real):string;
  714.  
  715. Begin
  716. shadeheight:=chr(27)+'*c'+realtostring(x,2)+'V';
  717. end;
  718. {---------------------------------------------------------------------}
  719. {---------------------------------------------------------------------}
  720. Function shadepercent(J:Integer):string;
  721.  
  722. Begin
  723. shadepercent:=chr(27)+'*c'+intostring(J)+'G';
  724. end;
  725. {---------------------------------------------------------------------}
  726. {---------------------------------------------------------------------}
  727. Function printshade:string;
  728.  
  729. Begin
  730. printshade:=chr(27)+'*c2P';
  731. end;
  732. {---------------------------------------------------------------------}
  733. end.
  734. 
  735.